<?php include("common/conn.php");  

if($_SESSION['userid']!=""){echo "<script>window.location.href='index.php';</script>";}

  if($_POST)
{
    
$rert=mysql_query("select * from admin where name='".$_POST["name"]."' and password='".$_POST["password"]."'"); 
$sdg=mysql_fetch_array($rert);
if($sdg==true)
{
$_SESSION["userid"] = $sdg['id'];
$_SESSION["name"] = $sdg['name'];

echo "<script>window.location.href='index.php';</script>";

}

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>e网批发后台管理系统</title>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
    $("#loginform").validate();
});
</script>
<style type="text/css">
html,body{
    width: 100%;
    height: 100%;
}
.error {
    padding: 7px;
    margin: 3px;
    background-color: #FCC;
    border: 1px solid #F00;
    font-family: arial;
    font-size: 10px;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    color: #000;
    float: left;
    width: 98%;
    -moz-border-radius:5px;
    -webkit-border-radius: 5px;
}

.touming {
    color: #fff;
}

 #loginform{
    width: 244px;
    margin-left: 10px;
    height: 280px;
/*    position: absolute ;
    left: 33%;
    top: 22%;*/
    /*color: #fff;*/
    background: black;
    opacity: 0.6
} 

#kuangk {
    background: url(image/kuangk.jpg); 
    background-repeat:no-repeat; 
    background-size:100% 100%; 
    width: 50%; 
    height: 300px;
    /*width: 244px;*/
    position: absolute ;
    left: 33%;
    top: 20%;
    color: #fff;
}

#header1 {
    padding-top:3%;
}

</style>

<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>

<body >
<div style="background: url(image/login.png) no-repeat center;background-size:100% 100%; width: 100%;height:100%">
<div id="admin_wrapper">


</div>

<div id="header1">
    <img src="image/logo.png" style="float: left; margin-left: 5%;">
    <h1 style="float: left; margin-left: 3%; color: #fff;">e网批发管理后台</h1>
</div>

<div id="kuangk">
            <form action="" id="loginform" method="post">
<!--                     START LOGO 
                    <div id="logo">
                    <h1>e网批发后台管理</h1>
                    </div>
                    END LOGO
                    <p>请登录!.</p> -->
                  
                    <!-- TEXTBOXES -->
                    <h2 class="touming" >用户登录</h2>
                    <!-- <label class="touming">用户名</label><br /> -->
                    <div style="background: #c3c3c3; width: 50px; height: 34px; margin-left:10px;float:left; opacity: 1; ">
                        <img src="./image/name.png" style="padding-left: 26%; width: 35%; height: 60%; padding-top:11%;">
                    </div>
                    <input class="touming" name="name" type="text" class="text large required" id="username" style=" background: #c3c3c3; border: 1px solid #c3c3c3; height: 30px;  opacity: 1; color: #000000; float: left;" placeholder="请输入用户名"/>
                    <br />
                    
                    <div class="clearfix">&nbsp;</div>
                    <!-- <label class="touming" >密码</label><br /> -->
                    <div style="background: #c3c3c3; width: 50px; height: 34px; float:left; margin-top: 10px; margin-left:10px; opacity: 1;">
                        <img src="./image/passwd.png" style="padding-left: 26%; width: 35%; height: 60%; padding-top:11%;">
                    </div>
                    <input class="touming" name="password" type="password" class="text large required" id="password" style=" background: #c3c3c3; border: 1px solid #c3c3c3; height: 30px; margin-top:10px;opacity: 1; color: #000000; opacity: 1; " placeholder="请输入密码" />


                     <br />
                
                    <div class="clearfix">&nbsp;</div>
                    <div style="margin-left: 10px;"><input type="checkbox" class="checkbox" id="cbdemo2" />记住密码</div>

                    
                    <input name="btnLogin" type="submit" class="submit" id="btnLogin" value="登录" style="background: #ff7a00; width: 200px; height: 40px; border-radius: 30px; margin-left: 20px; margin-top:10px" />
            </form>
</div><!-- end admin wrapper -->
<div id="fooder" style="position: absolute; top: 80%; left: 10%;">
    <img src="image/beian.png" style="float: left;"><h3 style="float: left; color: #fff; margin-top:5%; font-size: 16px;">贵公网安备  52011302004172</h3>
</div>
<div id="code" style="position: absolute; top:75%; left: 78%;">
    <img src="image/pifa.png">
    <img src="image/shenhuo.png">
    <div style="color: #f50b42; font-size: 16px;">手机APP二维码</div>
</div>
<!--     <div style="width:300px;margin:0 auto; padding:20px 0;">
        <a target="_blank" href="" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
        
            <p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">
                <img src="gongan_icon.jpg" style="float:left;"/>
                贵公网安备 52011302004172号
                </p>
        </a >
    </div> -->
</div>

</body>
</html>
